package com.lv.hechuang.common;

import android.util.Log;

import com.alibaba.fastjson.JSON;
import com.lv.hechuang.utils.AppSetting;


/**
 * Created by Administrator on 2018/1/3.
 */

public class CommonData {
    public static final String Grid_Data_Acquisition = "2";//数据采集
    public static final String Grid_Notice = "1";//社区公告
    public static final String Grid_Questionnaire_Investigation = "0";//问卷调查


    public static String getToken() {
        Log.e("token", AppSetting.getString(CommonString.AUTHORIZATION) + "//");
        return AppSetting.getString(CommonString.AUTHORIZATION);
    }

    public static void setAuthorization(String authorization) {
        AppSetting.putString(CommonString.AUTHORIZATION, authorization);
    }

    public static String getAppverID() {
        return AppSetting.getString(CommonString.APPVERID);
    }

    public static String getIdentity() {
        return AppSetting.getString(CommonString.LOGIN_IDENTITY);
    }

    public static void setIdentity(String identity) {
        AppSetting.putString(CommonString.LOGIN_IDENTITY, identity);
    }

    public static String getHouseIdentity(String identity_type) {
        String houseIdentity = "";
        if (identity_type.equals("1")) {
            houseIdentity = "业主";
        }
        if (identity_type.equals("2")) {
            houseIdentity = "家属";
        }
        if (identity_type.equals("3")) {
            houseIdentity = "租客";
        }
        return houseIdentity;
    }


}
